package com.lagou.repository;

import com.lagou.pojo.Article;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface ArticleRepository extends JpaRepository<Article,Integer> {
    @Query(value = "select count(*) as count from t_article",nativeQuery = true)
    public int queryCount();

    @Query(value = "SELECT * from t_article Limit ?1,?2",nativeQuery = true)
    public List<Article> queryPageList(Integer pageNo,Integer pageSize);
}
